home *** CD-ROM | disk | FTP | other *** search
- {****************************************************************************}
- {* *}
- {* UNIT FilExist (FilExist.pas) *}
- {* *}
- {* Donated to the Public Domain 5/20/91 by Dan Thomas CIS: 72301,2164 *}
- {* *}
- {* Purpose: *}
- {* *}
- {* To check for a file's presence. *}
- {* *}
- {****************************************************************************}
-
-
- UNIT FilExist;
-
-
- INTERFACE
-
- FUNCTION FILE_EXISTS(file_id : string) : boolean;
-
-
- {============================================================================}
- IMPLEMENTATION
-
- FUNCTION FILE_EXISTS(file_id : string) : boolean;
-
- var
- f : file;
-
- begin
- assign(f,file_id);
- {$i-} reset(f); {$i+}
- if ioresult = 0 then
- begin
- file_exists := true;
- {$i-} close(f); {$i+}
- if ioresult = 0 then;
- end
- else
- file_exists := false;
- end; {file_exists}
-
- end.
-